home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / c68_443b.lzh / SRC / P_C68_44.443 < prev   
Text File  |  1994-08-04  |  39KB  |  1,472 lines

  1. diff -c src/analyze.c c68/analyze.c
  2. *** src/analyze.c    Wed Jun 15 15:50:23 1994
  3. --- c68/analyze.c    Sat Jul 30 11:28:44 1994
  4. ***************
  5. *** 465,470 ****
  6. --- 465,477 ----
  7.       if (csp->voidf || (csp->exp->nodetype == en_icon &&
  8.                  csp->exp->v.i < 16 && csp->exp->v.i >= 0))
  9.       return 0;
  10. + #ifdef __TOS__
  11. +     if ( trap_option && csp->exp->nodetype == en_nacon &&
  12. +             ( csp->exp->v.sp == gemdos_name ||
  13. +               csp->exp->v.sp == xbios_name    ||
  14. +               csp->exp->v.sp == bios_name ) )
  15. +     return 0;
  16. + #endif /* __TOS__ */
  17.       if (is_lvalue(csp->exp))
  18.       return 2 * csp->uses;
  19.       return csp->uses;
  20. ***************
  21. *** 478,488 ****
  22.       CSE    **lst;
  23.   {
  24.       CSE     *csp1, *csp2;
  25.       csp1 = *lst;
  26.       if (csp1 == 0 || csp1->next == 0)
  27.       return;
  28.       bsort(&(csp1->next));
  29. !     while (csp1 != 0 && (csp2 = csp1->next) != 0 && desire(csp1) < desire(csp2)) {
  30.       *lst = csp2;
  31.       csp1->next = csp2->next;
  32.       csp2->next = csp1;
  33. --- 485,498 ----
  34.       CSE    **lst;
  35.   {
  36.       CSE     *csp1, *csp2;
  37. +     int      d1;
  38.       csp1 = *lst;
  39.       if (csp1 == 0 || csp1->next == 0)
  40.       return;
  41.       bsort(&(csp1->next));
  42. !     d1 = desire(csp1);
  43. !     while (csp1 != 0 && (csp2 = csp1->next) != 0 && d1 < desire(csp2)) {
  44.       *lst = csp2;
  45.       csp1->next = csp2->next;
  46.       csp2->next = csp1;
  47. diff -c src/cglbdec.h c68/cglbdec.h
  48. *** src/cglbdec.h    Wed Jun 15 15:50:23 1994
  49. --- c68/cglbdec.h    Sun Jul 31 07:33:42 1994
  50. ***************
  51. *** 38,43 ****
  52. --- 38,48 ----
  53.   extern int      lstrlen;    /* length of the value in laststr */
  54.   extern unsigned long ival;
  55.   extern char    *alloca_name;    /* pointer to the name alloca */
  56. + #ifdef __TOS__
  57. + extern char    *gemdos_name;    /* pointer to the names gemdos, */
  58. + extern char    *xbios_name;    /* xbios and bios        */
  59. + extern char    *bios_name;
  60. + #endif /* __TOS__ */
  61.   #ifdef FLOAT_SUPPORT
  62.   extern double   rval;
  63.   #endif /* FLOAT_SUPPORT */
  64. ***************
  65. *** 97,102 ****
  66. --- 102,110 ----
  67.   #ifdef TRACE
  68.   extern BOOL    trace_option;    /* generate trace code */
  69.   #endif /* TRACE */
  70. + #ifdef __TOS__
  71. + extern BOOL    trap_option;    /* generate traps for gemdos, xbios and bios */
  72. + #endif /* __TOS__ */
  73.   extern int    max_error_count; /* maximum number of errors before stopping */
  74.   
  75.   extern TYP     *ret_type;
  76. diff -c src/cglbdef.c c68/cglbdef.c
  77. *** src/cglbdef.c    Wed Jun 15 15:50:23 1994
  78. --- c68/cglbdef.c    Sun Jul 31 07:32:56 1994
  79. ***************
  80. *** 43,48 ****
  81. --- 43,53 ----
  82.   int     lstrlen;
  83.   unsigned long    ival;
  84.   char    *alloca_name;
  85. + #ifdef __TOS__
  86. + char    *gemdos_name;
  87. + char    *xbios_name;
  88. + char    *bios_name;
  89. + #endif /* __TOS__ */
  90.   #ifdef FLOAT_SUPPORT
  91.   double     rval;
  92.   #endif /* FLOAT_SUPPORT */
  93. ***************
  94. *** 117,122 ****
  95. --- 122,130 ----
  96.   #ifdef TRACE
  97.   BOOL     trace_option        = 0;
  98.   #endif
  99. + #ifdef __TOS__
  100. + BOOL     trap_option        = 1;
  101. + #endif /* __TOS__ */
  102.   #ifdef PROBES
  103.   BOOL     probe_option        = 0;
  104.   #endif /* PROBES */
  105. diff -c src/chdr.h c68/chdr.h
  106. *** src/chdr.h    Wed Jun 15 15:50:31 1994
  107. --- c68/chdr.h    Sun Jul 17 06:10:34 1994
  108. ***************
  109. *** 462,468 ****
  110.    *
  111.    *    For text of message types see the 'msgout.c' module
  112.    *
  113. !  *    It is EXTREMELY important that the order of this 
  114.    *    enum statement is kept consistent with the table
  115.    *    of messages in 'msgout.c'
  116.    */
  117. --- 462,468 ----
  118.    *
  119.    *    For text of message types see the 'msgout.c' module
  120.    *
  121. !  *    It is EXTREMELY important that the order of this
  122.    *    enum statement is kept consistent with the table
  123.    *    of messages in 'msgout.c'
  124.    */
  125. ***************
  126. *** 570,576 ****
  127.   #define    WARN_LEVEL2    WARN_AUTOINIT
  128.       WARN_AUTOINIT,
  129.       WARN_NOHEX,
  130. -     WARN_PARAMSIZE,
  131.       WARN_REDEFINE,
  132.       WARN_SIZEOF0,
  133.       WARN_SIZEOFBIG,
  134. --- 570,575 ----
  135. ***************
  136. *** 592,598 ****
  137.   /*
  138.    *    Level 4
  139.    *    Warnings at this level are often encountered when porting
  140. !  *    code, but are quite likely not be an error.
  141.    */
  142.   #define    WARN_LEVEL4    WARN_0TYPEDEF
  143.       WARN_0TYPEDEF,
  144. --- 591,597 ----
  145.   /*
  146.    *    Level 4
  147.    *    Warnings at this level are often encountered when porting
  148. !  *    code, but are quite likely not to be an error.
  149.    */
  150.   #define    WARN_LEVEL4    WARN_0TYPEDEF
  151.       WARN_0TYPEDEF,
  152. ***************
  153. *** 605,610 ****
  154. --- 604,610 ----
  155.       WARN_HIDE,
  156.       WARN_IMPLICIT,
  157.       WARN_NOTKANDR,
  158. +     WARN_PARAMSIZE,
  159.       WARN_NOTREACHED,
  160.       WARN_PROTOTYPE,
  161.       WARN_PROMOTE,
  162. diff -c src/cmain.c c68/cmain.c
  163. *** src/cmain.c    Wed Jun 15 15:50:24 1994
  164. --- c68/cmain.c    Sun Jul 31 07:32:58 1994
  165. ***************
  166. *** 41,46 ****
  167. --- 41,50 ----
  168.   
  169.   #undef P_
  170.   
  171. + #ifdef __MINT__
  172. + long _stksize = -1L;
  173. + #endif
  174.   static void
  175.   exception(sig)
  176.       int             sig;
  177. ***************
  178. *** 55,61 ****
  179.   #endif
  180.   #endif
  181.   
  182. ! main(argc, argv)
  183.       int         argc;
  184.       char    **argv;
  185.   {
  186. --- 59,65 ----
  187.   #endif
  188.   #endif
  189.   
  190. ! int main(argc, argv)
  191.       int         argc;
  192.       char    **argv;
  193.   {
  194. ***************
  195. *** 221,226 ****
  196. --- 225,233 ----
  197.   #ifdef TRACE
  198.           {"trace",       invert,    &trace_option,        NULL},
  199.   #endif /* TRACE */
  200. + #ifdef __TOS__
  201. +         {"trap",        invert,    &trap_option,        NULL},
  202. + #endif /* __TOS__ */
  203.           {"trad",        invert,    &trad_option,        NULL},
  204.           {"trans",       invert,    &trans_option,        NULL},
  205.           {"uchar",       invert,    &uchar_option,        NULL},
  206. ***************
  207. *** 364,383 ****
  208.       if ((input = fopen(*argv, "r")) == NULL) {
  209.           message(MSG_OPENFILE,*argv,message_text(MSG_INPUT));
  210.           exit(2);
  211. !     } 
  212.       VOIDCAST strcpy(act_file,*argv);
  213.       }
  214.       argv++;
  215.       if (argc > 1)
  216.       /* used named file instead of stdout */
  217. !     if ((output = fopen(*argv, "w")) == NULL) {
  218.           message(MSG_OPENFILE,*argv,message_text(MSG_OUTPUT));
  219.           exit(2);
  220.       }
  221.       argv++;
  222.       if (argc > 2)
  223.       /* used named listing file instead of stderr */
  224. !     if ((listfile = fopen(*argv, "w")) == NULL) {
  225.           message(MSG_OPENFILE,*argv,message_text(MSG_LISTING));
  226.           exit(2);
  227.       }
  228. --- 371,390 ----
  229.       if ((input = fopen(*argv, "r")) == NULL) {
  230.           message(MSG_OPENFILE,*argv,message_text(MSG_INPUT));
  231.           exit(2);
  232. !     }
  233.       VOIDCAST strcpy(act_file,*argv);
  234.       }
  235.       argv++;
  236.       if (argc > 1)
  237.       /* used named file instead of stdout */
  238. !     if ((output = fopen(*argv, "wb")) == NULL) {
  239.           message(MSG_OPENFILE,*argv,message_text(MSG_OUTPUT));
  240.           exit(2);
  241.       }
  242.       argv++;
  243.       if (argc > 2)
  244.       /* used named listing file instead of stderr */
  245. !     if ((listfile = fopen(*argv, "wb")) == NULL) {
  246.           message(MSG_OPENFILE,*argv,message_text(MSG_LISTING));
  247.           exit(2);
  248.       }
  249. diff -c src/config.c68 c68/config.c68
  250. *** src/config.c68    Wed Jun 15 15:50:24 1994
  251. --- c68/config.c68    Sun Jul 31 03:37:26 1994
  252. ***************
  253. *** 79,86 ****
  254.   #undef    MC68020            /* This is an 68020 compiler */
  255.   #undef    MC68030            /* This is an 68030 compiler */
  256.   
  257. ! #define    TARGET_ACK        /* Generate ACK assembler output */
  258. ! #undef    TARGET_CPM        /* Generate DRI assembler output */
  259.   #undef    TARGET_GAS        /* Generate GAS assembler output */
  260.   #undef    TARGET_QMAC        /* Generate QMAC assembler output */
  261.   
  262. --- 79,86 ----
  263.   #undef    MC68020            /* This is an 68020 compiler */
  264.   #undef    MC68030            /* This is an 68030 compiler */
  265.   
  266. ! #undef    TARGET_ACK        /* Generate ACK assembler output */
  267. ! #define    TARGET_CPM        /* Generate DRI assembler output */
  268.   #undef    TARGET_GAS        /* Generate GAS assembler output */
  269.   #undef    TARGET_QMAC        /* Generate QMAC assembler output */
  270.   
  271. ***************
  272. *** 90,97 ****
  273.    *    of ACK has this bug fixed, then in some cases slightly more
  274.    *    efficient code is generated if you comment out this option
  275.    */
  276. ! #define    MOVEMBUG        /* Assembler has problems in MOVEM */
  277. ! #define    CMP_BUG            /* Assembler has problems in CMP */ 
  278.   #define    RELOC_BUG        /* Assembler has problems with Label1-Label2 */
  279.   
  280.   /*
  281. --- 90,97 ----
  282.    *    of ACK has this bug fixed, then in some cases slightly more
  283.    *    efficient code is generated if you comment out this option
  284.    */
  285. ! #undef    MOVEMBUG        /* Assembler has problems in MOVEM */
  286. ! #undef    CMP_BUG            /* Assembler has problems in CMP */
  287.   #define    RELOC_BUG        /* Assembler has problems with Label1-Label2 */
  288.   
  289.   /*
  290. ***************
  291. *** 138,144 ****
  292.    *    Ensure that the setting is compatible with the value defined in your
  293.    *    library and header files.
  294.    */
  295. ! #define    TP_SIZE        tp_uint    /* size_t type; either tp_uint or tp_ulong */
  296.   /*
  297.    *    Many K&R compilers have as